package com.dayaokeji.server_api.api;

import com.dayaokeji.server_api.ServerResponse;
import com.dayaokeji.server_api.domain.AppState;
import com.dayaokeji.server_api.domain.Feedback;
import com.dayaokeji.server_api.domain.RemoteHost;

import java.util.List;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;

/**
 * Created by Gorden on 2017/10/14.
 * 系统相关API
 */

public interface SystemApi {

    @POST("course/feedback/create")
    Call<ServerResponse<Void>> feedback(@Body Feedback feedback);

    @GET("http://api.jiantuokeji.com/course/sysParameter/loginAddress#url_ignore")
    Call<ServerResponse<List<RemoteHost>>> remoteHost();

    /**
     * 上传App状态
     * @param appState
     * @return
     */
    @POST("course/user/changeAppState")
    Call<ServerResponse<Void>> appSate(@Body AppState appState);

    /**
     * 获取百度网络时间
     * @return
     */
    @GET("http://www.m.baidu.com#url_ignore")
    Call<ResponseBody> webDate();

    /**
     * 刷新Token
     * @return
     */
    @GET("course/token/refresh")
    Call<ServerResponse<String>> refreshToken();


}
